import CesiumNavigation from '@/assets/dist/CesiumNavigation.js'
import Utils from './index.js'

export default class Compass {
  constructor(viewer, option) {
    this.initCompass(viewer, option)
  }

  initCompass(viewer, option) {
    var compass = {};
    compass.enableCompass = true;
    compass.enableZoomControls = true;
    compass.enableDistanceLegend = false;
    compass.enableCompassOuterRing = true;
    if (!Utils.nullBool(option)) {
      compass.defaultResetView = option.position
    }
    new CesiumNavigation(viewer, compass);
    //viewer.extend(Cesium.viewerCesiumNavigationMixin,compass);
  }
}